﻿@{
    ViewBag.Title = "新增、编辑操作权限";
}
@model DotNet.Model.MyEntity.Base_PermissionItem
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#form_Permission_Item_Cteate").submit(function () {
            return false;
        });
    });   
</script>
<div class="pageContentD">
    @{Html.EnableClientValidation();}
    @using (Html.BeginForm("Creating", "PermissionItem", new { pid = @ViewBag.ID }, FormMethod.Post, new { onsubmit = "return validateCallback(this,dialogAdded_Permission_PermissionItem);", @id = "form_Permission_Item_Cteate", @class = "pageForm" }))
    {    
        <div class="pageFormContent" layouth="60">
            <table width="95%" class="tab01 tabNo">
                <tr>
                    <td class="td1" style="width:25%;">
                            名称：
                    </td>
                    <td>
                        @Html.Raw(Model == null || Model.Id == null ? "" : "<input type=\"hidden\" value=\"" + Model.Id + "\" id=\"Id\" name=\"Id\" />")
                        @Html.TextBoxFor(m => m.FullName, new Dictionary<string, object> { { "alt", "请输入名称" }, { "class", "input02" } })
                        @Html.ValidationMessageFor(m => m.FullName)
                        @Html.HiddenFor(m => m.ParentId)
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                            编号：
                    </td>
                    <td>
                        @Html.TextBoxFor(m => m.Code, new Dictionary<string, object> { { "class", "input02" } })
                        @Html.ValidationMessageFor(m => m.Code)
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="checkbox" name="Enabled" id="Enabled" value="1"  @Html.Raw(Model == null || Model.Enabled == null ? "checked='checked'" : (Model.Enabled == 1 ? "checked='checked'" : "")) />有效
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                            备注：
                    </td>
                    <td>
                        @Html.TextAreaFor(m => m.Description, new Dictionary<string, object> { { "class", "input05" } })
                    </td>
                </tr>
            </table>
        </div>
        <div class="formBar">
            <ul>
                <li>
                    <button type="submit" class="btn btn-success btn-sm" id="btnSave_Permission_Item_Cteate">
                        保存</button>
                </li>
                <li>
                    <button type="button" class="close btn btn-default btn-sm">
                        取消</button>
                </li>
            </ul>
        </div>
    }
</div>
